package springboot.ltq.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springboot.ltq.entity.Country;
import springboot.ltq.service.serviceImpl.CountryService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by lu on 2017/7/8.+
 */

@RestController
@EnableAutoConfiguration
public class TestController {

    @Autowired
    private CountryService countryService;

    @RequestMapping(value = "/index")
    public Map<String, Object> login() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Country> country_list = countryService.country_list();
        map.put("country_list", country_list);
        return map;
    }
}
